#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,k,t;
const ll N=1e5+5;
ll arr[N],brr[N],sum[N],sq[N];
bool check(ll m){
  memcpy(brr,arr,sizeof(ll)*(m+1));
  sort(brr+1,brr+1+m);
  for (ll i=1;i<=m;i++){
    sum[i]=sum[i-1]+brr[i];
    sq[i]=sq[i-1]+(brr[i]*brr[i]);
  }
  for (ll i=k;i<=m;i++){
  	if ((1.0*(sq[i]-sq[i-k])/k-((1.0*(sum[i]-sum[i-k])/k)*(1.0*(sum[i]-sum[i-k])/k)))<t)return true;
  }
  
  return false;
}
ll get(ll left,ll right){
  ll ans=-1;
  while(left<=right){
    ll mid=(left+right)>>1;
    if (check(mid)){
      ans=mid;
      right=mid-1;
    }else{
      left=mid+1;
    }
  }
  return ans;
}
int main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cin>>n>>k>>t;
  for (ll i=1;i<=n;i++)cin>>arr[i];
  cout<<get(k,n-1);
	return 0; 
} 
